define(function() {
    return ['$scope','$location', '$interval','$timeout', function($scope,$location,$interval,$timeout) {
		$scope.$emit("top-show",'true');//顶部显示
    	$scope.$emit('menuTypeLight','mine'); 	//控制底部menu高亮
    	$scope.$emit('bub-menu','true'); 	//隐藏底部menu
    	$scope.$emit('flag-tag','11');//显示底部文字
    	
    	//默认值
    	$scope.firstPwd = _YHC_util.strToArr("");
    	var tempRandom = 2.4,tempPassword = "";
    	$scope.$emit("pwdSlidUp",3);
    	
    	//监听子集显示顶部显示
        $scope.$on('pwdChange', function(event, data) {
        	$timeout(function(){
        		if(data.length == 6){
        			tempPassword = data;
        		}
        		$scope.firstPwd = _YHC_util.strToArr(data);
        	},0);
        });
    	
    	//点击获取密码数据
    	$scope.getPassword = function(){
    		$scope.$emit("pwdSlidUp",tempRandom++);
    	}
    	
    	
    	//监听第一次密码输入
    	$scope.$watch('firstPwd', function() {
    		if(($scope.firstPwd)[5] != ""){
    			transData.pwd1 = tempPassword;
    			$timeout(function(){
    				$scope.$emit("goNext","/setFindPwdSecond");
				},200);
    		}
		});
    	
    	//当键盘被销毁的时候
        $scope.$on("$destroy", function() {
        	$scope.$emit("pwdSlidUp","");
	    });
    	
        $scope.$apply();
    }];
});